package com.express.e.root.bean;

import java.util.Date;
import java.util.Objects;

public class Admin {
    private Integer adminId;
    private String adminName;
    private String adminPwd;
    private String loginIP;
    private Date lastTime;
    private Integer state;
    private Integer role;
    private String phone;
    private String cardId;

    public Admin(Integer adminId, String adminName, String adminPwd, String phone, String cardId) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.phone = phone;
        this.cardId = cardId;
    }

    public Admin(String adminName, String adminPwd, String loginIP, Date lastTime, Integer state, Integer role, String phone, String cardId) {
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.loginIP = loginIP;
        this.lastTime = lastTime;
        this.state = state;
        this.role = role;
        this.phone = phone;
        this.cardId = cardId;
    }

    public Admin(Integer adminId, String adminName, String adminPwd, String loginIP, Date lastTime, Integer state, Integer role) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.loginIP = loginIP;
        this.lastTime = lastTime;
        this.state = state;
        this.role = role;
    }

    public Admin(Integer adminId, String adminName, String adminPwd, String loginIP, Date lastTime, Integer state, Integer role, String phone, String cardId) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.loginIP = loginIP;
        this.lastTime = lastTime;
        this.state = state;
        this.role = role;
        this.phone = phone;
        this.cardId = cardId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Admin)) return false;
        Admin admin = (Admin) o;
        return Objects.equals(getAdminId(), admin.getAdminId()) &&
                Objects.equals(getAdminName(), admin.getAdminName()) &&
                Objects.equals(getAdminPwd(), admin.getAdminPwd()) &&
                Objects.equals(getLoginIP(), admin.getLoginIP()) &&
                Objects.equals(getLastTime(), admin.getLastTime()) &&
                Objects.equals(getState(), admin.getState()) &&
                Objects.equals(getRole(), admin.getRole()) &&
                Objects.equals(getPhone(), admin.getPhone()) &&
                Objects.equals(getCardId(), admin.getCardId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getAdminId(), getAdminName(), getAdminPwd(), getLoginIP(), getLastTime(), getState(), getRole(), getPhone(), getCardId());
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminId=" + adminId +
                ", adminName='" + adminName + '\'' +
                ", adminPwd='" + adminPwd + '\'' +
                ", loginIP='" + loginIP + '\'' +
                ", lastTime=" + lastTime +
                ", state=" + state +
                ", role=" + role +
                ", phone=" + phone +
                ", cardId=" + cardId +
                '}';
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getAdminPwd() {
        return adminPwd;
    }

    public void setAdminPwd(String adminPwd) {
        this.adminPwd = adminPwd;
    }

    public String getLoginIP() {
        return loginIP;
    }

    public void setLoginIP(String loginIP) {
        this.loginIP = loginIP;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public Admin() {
    }
}
